fn main() {
    use std::path::PathBuf;
    use std::env;
    let ui_name = "myuifile";
    println!("cargo:rerun-if-changed=src/{}.fl", ui_name);
    let g = fl2rust::Generator::default();
    let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
    //g.in_out(format!("src/{}.fl", ui_name), out_path.join(format!("{}.rs", ui_name)).to_str()).expect("Failed to generate rust from fl file!");
    g.in_out(format!("src/{}.fl", ui_name), format!("{}/{}.rs", out_path.to_str().unwrap(), ui_name)).expect("Failed to generate rust from fl file!");
    g.in_out(format!("src/{}.fl", ui_name), format!("src/ui_{}.rs", ui_name)).expect("Failed to generate rust from fl file!");
}

